using System;
using System.Data;
using System.Data.Odbc;
using System.Collections.Generic;
using System.Text;

namespace Travel.Library
{
    class DBTypes : Travel.Library.DBParams
    {
        public OdbcType GetTypes(int iTypes)
        {
            switch (iTypes)
            {
                case i_Type_BigInt:
                    return OdbcType.BigInt;                    
                case i_Type_Binary:
                    return OdbcType.Binary;                    
                case i_Type_Bit:
                    return OdbcType.Bit;                    
                case i_Type_Char:
                    return OdbcType.Char;                    
                case i_Type_Date:
                    return OdbcType.Date;                     
                case i_Type_DateTime:
                    return OdbcType.DateTime;                    
                case i_Type_Decimal:
                    return OdbcType.Decimal;                    
                case i_Type_Numeric:
                    return OdbcType.Numeric;                    
                case i_Type_Double:
                    return OdbcType.Double;                
                case i_Type_Image:
                    return OdbcType.Image;
                case i_Type_Int:
                    return OdbcType.Int;
                case i_Type_NChar:
                    return OdbcType.NChar;
                case i_Type_NText:
                    return OdbcType.NText;
                case i_Type_NVarChar:
                    return OdbcType.NVarChar;
                case i_Type_Real:
                    return OdbcType.Real;
                case i_Type_UniqueIdentifier:
                    return OdbcType.UniqueIdentifier;
                case i_Type_SmallDateTime:
                    return OdbcType.SmallDateTime;
                case i_Type_SmallInt:
                    return OdbcType.SmallInt;
                case i_Type_Text:
                    return OdbcType.Text;
                case i_Type_TimeStamp:
                    return OdbcType.Timestamp;                    
                case i_Type_TinyInt:
                    return OdbcType.TinyInt;                    
                case i_Type_VarBinary:
                    return OdbcType.VarBinary;                   
                case i_Type_VarChar:
                    return OdbcType.VarChar;                    
                case i_Type_Time:
                    return OdbcType.Time;                 
            }
            return OdbcType.VarChar;
        }
    }
}
